package map_;

@SuppressWarnings({"all"})

public class HashSetStr {
    public static void main(String[] args) {
        //1.创建一个数组，类型为Node[]（也被称为表）table = {Node[16]@545}
        Node[] table = new Node[16];
        System.out.println("table" + table);
        Node jack = new Node("jack",null);
        table[1] = jack ;
        Node lucy = new Node("lucy",null);
        jack.next = lucy;//lucy节点挂载到jack下
        System.out.println("table" +table);

        Node rose = new Node("rose",null);
        table[2] = rose;
        System.out.println("table" + table);
    }
}
class Node{//节点，存储数据，可以指向下一节点，从而形成链表
    Object item;//存储数据
    Node next;//指向下一节点

    public Node(Object item, Node next) {
        this.item = item;
        this.next = next;
    }
}